Scenario #2011: Create Addition Debitor for Partner

UseCase Create Self Debitor For Partner => Debitor: D-3101001 - Test AG - additional debitor

Properties

Required

Given

name value
partnerPersonTradeName Test AG
billingContactCaption Test AG - billing department
billingContactEmailAddress billing@test-ag.example.org
debitorNumberSuffix 01
billable true
vatId VAT123456
vatCountryCode DE
vatBusiness true
vatReverseCharge false
defaultPrefix tsx

partnerPersonUuid

HTTP GET "/api/hs/office/relations?relationType=PARTNER&personData=Test+AG" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }`
=> status: 200 OK 
[ {
  "uuid" : "d8468486-cc0a-4797-b367-4c393953f190", // partnerRelationUuid
  "anchor" : {
    "uuid" : "bb7b76f1-1922-46aa-8c22-468c70c3a9fa", // Person: Hostsharing eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Hostsharing eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "1223603d-1a3b-4e0c-a244-027585d22eb2", // partnerPersonUuid
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Test AG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "type" : "PARTNER",
  "mark" : null,
  "contact" : {
    "uuid" : "c9fdae44-bedc-4fb6-b5ad-f7016218fc25", // Contact: Test AG - China
    "caption" : "Test AG - China",
    "postalAddress" : {
      "country" : "China",
      "province" : "Guangdong Province",
      "city" : "Dongguan City",
      "street" : "No.2 Commercial Second Street",
      "district" : "Niushan Wei Wu",
      "department" : "Executive Board",
      "building" : "Thi Chi Koh Building"
    },
    "emailAddresses" : {
      "main" : "norden@test-ag.example.org"
    },
    "phoneNumbers" : {
      "phone" : "++15 999 654321"
    }
  }
} ]

In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one.

BankAccount: Test AG - refund bank account

HTTP POST "/api/hs/office/bankaccounts" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }` \
  -H 'Content-Type: application/json' \
  --data-binary @- <<EOF
{
  "holder" : "Test AG - refund bank account",
  "iban" : "DE88100900001234567892",
  "bic" : "BEVODEBB"
}
EOF
=> status: 201 CREATED ab378c28-6b35-42e0-9059-5c56c23ff409

Contact: Test AG - billing department

HTTP POST "/api/hs/office/contacts" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }` \
  -H 'Content-Type: application/json' \
  --data-binary @- <<EOF
{
  "caption" : "Test AG - billing department",
  "emailAddresses" : {
    "main" : "billing@test-ag.example.org"
  }
}
EOF
=> status: 201 CREATED da11a7e9-fc2a-4146-8341-efd91169a79f

Create Debitor: D-3101001 - Test AG - additional debitor

HTTP POST "/api/hs/office/debitors" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }` \
  -H 'Content-Type: application/json' \
  --data-binary @- <<EOF
{
  "debitorRel" : {
    "anchor.uuid" : "1223603d-1a3b-4e0c-a244-027585d22eb2", // partnerPersonUuid
    "holder.uuid" : "1223603d-1a3b-4e0c-a244-027585d22eb2", // partnerPersonUuid
    "contact.uuid" : "da11a7e9-fc2a-4146-8341-efd91169a79f" // Contact: Test AG - billing department
  },
  "debitorNumberSuffix" : "01",
  "billable" : true,
  "vatId" : "VAT123456",
  "vatCountryCode" : "DE",
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount.uuid" : "ab378c28-6b35-42e0-9059-5c56c23ff409", // BankAccount: Test AG - refund bank account
  "defaultPrefix" : "tsx"
}
EOF
=> status: 201 CREATED 67547b6f-8456-4780-a1ab-c250df8749d8

generated on 2026-07-17 01:42:26 for branch